#ifndef _CPU_H
#define _CPU_H

//#define DEBUG_CPU

#include "CPU_if.h"
#include <time.h>

class CPU
: public sc_module
{
public :
	unsigned System_type;
	unsigned Experiment_type;
	unsigned PRD_length;
	unsigned DMA_command;

	sc_in_clk	CLK;
	sc_in<bool> RSTn;

	sc_port<CPU_if, 1>	system_port;

	SC_HAS_PROCESS(CPU);

	CPU(sc_module_name	name_,
		unsigned		Main_DMA_PRD_start_addr_,
		unsigned		SSD_DMA_PRD_start_addr_,
		unsigned		DMA_cmd_reg_start_addr_,
		unsigned		System_type_,
		unsigned		Experiment_type_,
		unsigned		PRD_length_,
		unsigned		DMA_command_);
	
	~CPU();

protected:
	CPU_addr_t	Main_DMA_PRD_start_addr;
	CPU_addr_t	SSD_DMA_PRD_start_addr;
	CPU_addr_t	DMA_cmd_reg_start_addr;

	void
	CPU_action();
};

#endif
